{extend name="public/base" /}

{block name="title"}<title>{:lang('list')}</title>{/block}

{block name="pjax_container"}
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header with-border" style="height:51px;" >
                    <div class="pull-left">
                        {:auth_action(CONTROLLER_NAME.'/create', 'a', lang('create'), [], 'primary', 'sm', 'save')} 
                    </div>
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-hover table-bordered">
                        <tr>
                            <th>{:lang('id')}</th>
                            <th>{:lang('typename')}</th>
                            <th>{:lang('mod')}</th>
                            <th>{:lang('dirs')}</th>
                            <th>{:lang('sorts')}</th>
                            <th>{:lang('status')}</th>
                            <th width="180">{:lang('action')}</th>
                        </tr>
                        {volist name="dataList" id="vo"}
                        <tr>
                            <td>{$vo.id}</td>
                            <td>
                                {if $vo.h_layer eq 1 }
                                {else /}{for start="1" end="$vo.h_layer"}　　　{/for}├
                                {/if}
                                {:list_write($vo, 'typename')}
                            </td>
                            <td>{$vo.mod_text}</td>
                            <td>{:list_write($vo, 'dirs')}</td>
                            <td>{:list_write($vo, 'sorts')}</td>
                            <td>{:list_status($vo['id'], $vo['status'])}</td>
                            <td>
                                <a class="btn btn-primary btn-xs" href="{$vo.typelink}" target="_blank"><i class="fa fa-eye"></i> {:lang('preview')}</a>
                                {include file="public/list_action" /}
                            </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
<script type="text/javascript">
$(function(){
    index_list_init();
})
</script>
{/block}